package lab02.test06;

public class Ladder {
    //1.上底、下底、高、面积属性
    double top;
    double bottom;
    double height;
    double area;

    public Ladder(){}

    public Ladder(double top,double bottom,double height){
        this.top=top;
        this.bottom=bottom;
        this.height=height;
    }

    public double getTop() {
        return top;
    }
    public void setTop(double top){
        this.top=top;
    }
    public double getBottom() {
        return bottom;
    }
    public void setBottom(double bottom){
        this.bottom=bottom;
    }
    public double getHeight() {
        return height;
    }
    public void setHeight(double height){
        this.height=height;
    }
    double area(){
       area=((top+bottom)*height)/2;
        return area ;
    }
}
